﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>管理子菜单</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../../CSS/bootstrap3.2/css/bootstrap.css" rel="stylesheet">
    <script src="../../Scripts/jquery-1.8.0.min.js"></script>
    <script src="../../Scripts/avalon.js"></script>
    <script src="../../Scripts/B2CCommon.js"></script>
    <script>
        var model = avalon.define({
            $id: "MangnerSPLB",
            orderid: ComFunJS.getQueryString("id") ? ComFunJS.getQueryString("id") : "20150413163944",
            item: { "Receiver": "", "Telephone": "", "Province": "", "City": "", "County": "", "Address": "", "ExpressWay": "", "PayMethod": "", "Invoice": "", "InvoiceTitle": "", "InvoiceContent": "" },
            spdata: [],
            deldata: function (el) {
                $.get("../Comon/DLLAjaxHandler.ashx", { Action: "DelData", Table: "PT_Pro_Category", QueryCondition: " ID=" + el.ID }, function (data) {
                    if (data == "success") {
                        toastr.success('删除成功');
                        model.modedata.remove(el);
                    }
                    else {
                    }
                });
            }
        })
        avalon.ready(function () {
            $.getJSON("../Comon/ComAjaxHandler.ashx", { Action: "GetJsonData", Table: "PT_Order_Header", QueryCondition: " AND ORDERID=" + model.orderid }, function (data) {
                if (data) {
                    model.item = data[0];
                }
                else {
                }
            });
            $.getJSON("../Comon/ComAjaxHandler.ashx", { Action: "GetJsonData", Table: "PT_Order_Item", QueryCondition: " AND ORDERID=" + model.orderid }, function (data) {
                if (data) {
                    model.spdata = data;
                }
                else {
                }
            });
        })
    </script>
</head>
<body>
    <div class="container-fluid" ms-controller="MangnerSPLB" style="margin-top: 20px">
        <form>
            <div class="form-group">
                <label>收货信息</label>
                <p class="help-block">收货人：{{item.Receiver}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    联系电话：{{item.Telephone}}</p>
                <p class="help-block">收货地址：{{item.Province+item.City+item.County+item.Address}}</p>
            </div>
            <div class="form-group">
                <label>配送方式</label>
                <p class="help-block">{{item.ExpressWay}}</p>
            </div>
            <div class="form-group">
                <label>支付方式</label>
                <p class="help-block">{{item.PayMethod}}</p>
            </div>
            <div class="form-group">
                <label>发票信息</label>
                <p class="help-block">发票类型：{{item.Invoice}}</p>
                <p class="help-block">发票抬头：{{item.InvoiceTitle}}</p>
                <p class="help-block">发票内容：{{item.InvoiceContent}}</p>

            </div>
            <div class="form-group">
                <p class="help-block">使用积分：{{item.Points}}</p>
                <p class="help-block">积分兑换金额：{{item.PointsMoney}}</p>

            </div>
        </form>
        <table class="table table-bordered table-hover table-hover">
            <thead>
                <tr>
                    <th colspan="5" class="text-center">商品列表</th>
                </tr>
                <tr>
                    <th>商品名称</th>
                    <th>市场价格</th>
                    <th>销售数量</th>
                    <th>销售价格</th>
                    <th>小计</th>
                </tr>
            </thead>
            <tbody>
                <tr ms-repeat-el="spdata">
                    <td>
                        <img ms-src="el.ImgUrl" style="width: 150px; height: 150px" />{{el.Title}}</td>
                    <td>{{el.Price1}}</td>
                    <td>{{el.Qty}}</td>
                    <td>{{el.Price2}}</td>
                    <td>{{el.Qty*el.Price2}}</td>

                </tr>
            </tbody>
            <tfoot>
                <tr>
                    <th colspan="5" class="text-right">订单金额：{{item.PayPrice}}</th>
                </tr>
            </tfoot>
        </table>
    </div>
    <script src="../../JqueryPlug/Toast/toastr.js"></script>

</body>
</html>
